import { createStore, applyMiddleware } from 'redux';
import reducer from '../Reducer/index';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';

const logger = createLogger();
//创建一个 Redux store 来以存放应用中所有的 state，应用中应有且仅有一个 store。
var store = createStore(
    reducer,
    applyMiddleware(thunk, logger)
);

export default store;